﻿@using Ext.Net
@using Ext.Net.MVC
@model DoAnForum.Models.LogOnModel
@{
    ViewBag.Title = "LogOn";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@Html.X().ResourceManager().Theme(Theme.Default)
@Html.X().FormPanel().ID("LogOnPanel").StyleSpec("position: static; z-index: 10;width: 70%;").Border(false).Listeners(ls => ls.ValidityChange.Handler = "App.btnLogOn.setDisabled(!valid)").Items(
    Html.X().Label().Text("Đăng nhập").StyleSpec("color:green; font-weight:bold; font-size:18").Margin(30),
    Html.X().TextFieldFor(m=>m.UserName).Margin(30).Width(350),
    Html.X().TextFieldFor(m=>m.Password).InputType(Ext.Net.InputType.Password).Margin(30).Width(350),
    Html.X().Panel().Width(100).StyleSpec("Float: right").Margin(10).Border(false).Items(
        Html.X().Button().ID("btnLogOn").Text("Đăng nhập").Width(80).Margin(10).Disabled(true).DirectEvents(de=>
                                                                    {
                                                                        de.Click.Url = Url.Action("LogOn");
                                                                        de.Click.EventMask.ShowMask = true;
                                                                        de.Click.FormID = "LogOnPanel";
                                                                    }),
        Html.X().HyperLink().Text("Quên mật khẩu!").NavigateUrl("/Account/ForgotPassword").Width(100)
    )
)